home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / angelpang.swf / scripts / frame_8 / PlaceObject2_390_802 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-13  |  2.5 KB  |  90 lines

  1. onClipEvent(enterFrame){
  2.    if(_parent.move_play)
  3.    {
  4.       if(ishit)
  5.       {
  6.          if(this.hit.hitTest(_parent.hero.Hit))
  7.          {
  8.             _parent.canPlay = false;
  9.             _parent.player_move = false;
  10.             _parent.hero.gotoAndStop("die");
  11.          }
  12.          g += _parent.GGG;
  13.          this._x += speedX;
  14.          sn = Math.abs(Math.cos(3.141592653589793 * g / 180));
  15.          this._y = _parent.Hit._y + 40 - sn * dis;
  16.          if(g % 360 == 90 || g % 360 == 270)
  17.          {
  18.             dis = 150;
  19.          }
  20.          if(this.hitTest(_parent.hit_L))
  21.          {
  22.             speedX = 4 + zzz_num;
  23.          }
  24.          if(this.hitTest(_parent.hit_R))
  25.          {
  26.             speedX = -4 + (- zzz_num);
  27.          }
  28.       }
  29.    }
  30.    if(Att_hit)
  31.    {
  32.       if(this.hitTest(_parent.arrow_1.hit))
  33.       {
  34.          ishit = false;
  35.          _parent.arrow_1.gotoAndStop(1);
  36.          _parent.sssball11._x = this._x + 10;
  37.          _parent.sssball12._x = this._x - 10;
  38.          this.play();
  39.       }
  40.       if(this.hitTest(_parent.arrow_2.hit))
  41.       {
  42.          ishit = false;
  43.          _parent.arrow_2.gotoAndStop(1);
  44.          _parent.sssball11._x = this._x + 10;
  45.          _parent.sssball12._x = this._x - 10;
  46.          this.play();
  47.       }
  48.       if(this.hitTest(_parent.arrow_3.hit))
  49.       {
  50.          ishit = false;
  51.          _parent.arrow_3.gotoAndStop(1);
  52.          _parent.sssball11._x = this._x + 10;
  53.          _parent.sssball12._x = this._x - 10;
  54.          this.play();
  55.       }
  56.       if(this.hitTest(_parent.arrow_4.hit))
  57.       {
  58.          ishit = false;
  59.          _parent.arrow_4.gotoAndStop(1);
  60.          _parent.sssmball11._x = this._x + 10;
  61.          _parent.sssmball12._x = this._x - 10;
  62.          this.play();
  63.       }
  64.       if(this.hitTest(_parent.arrow_5.hit))
  65.       {
  66.          ishit = false;
  67.          _parent.arrow_5.gotoAndStop(1);
  68.          _parent.sssball11._x = this._x + 10;
  69.          _parent.sssball12._x = this._x - 10;
  70.          this.play();
  71.       }
  72.       if(this.hitTest(_parent.arrow_7.hit))
  73.       {
  74.          ishit = false;
  75.          _parent.arrow_7.gotoAndStop(1);
  76.          _parent.sssball11._x = this._x + 10;
  77.          _parent.sssball12._x = this._x - 10;
  78.          this.play();
  79.       }
  80.       if(this.hitTest(_parent.arrow_8.hit))
  81.       {
  82.          ishit = false;
  83.          _parent.arrow_8.gotoAndStop(1);
  84.          _parent.sssball11._x = this._x + 10;
  85.          _parent.sssball12._x = this._x - 10;
  86.          this.play();
  87.       }
  88.    }
  89. }
  90.